package cn.bonoon.kernel.menus;

import cn.bonoon.kernel.util.StringHelper;

/**
 * 菜单信息
 * 
 * @author jackson
 * 
 */
class MenuDefinitionImpl extends AbstractMenuable implements MenuDefinition{

	/** 菜单所属的频道 */
	protected ChannelDefinitionImpl channel;
	
	/** 菜单的导航信息 */
	protected MenuNavigation navigation;
	
	@Override
	public String navigation() {
		return navigation.navigation();
	}

	@Override
	protected void init(PlatformContext platformContext, 
			ModuleContext moduleContext, 
			ParentContainer parent){

		super.init(platformContext, moduleContext, /*itemCached, */parent);
		
		if (StringHelper.isEmpty(href)) {
			href = "javascript:void(null);";
		}

	}

	public void button(StringBuilder a, String selected) {
		_button(href, a, selected);
	}

	@Override
	protected ChannelDefinitionImpl internalChannel() {
		return channel;
	}
}
